
import http from '@/util/request'
// 基础应用-
export default {
  imgUpload: {
    url: `${process.env.VUE_APP_API_URL}/eduWeixin/fileupload`,
    name: '图片上传',
    post: async function (params) {
      const dataObj = await http.upload(this.url, params)
      return dataObj
    }
  },
  getAllClass: {
    url: `${process.env.VUE_APP_API_URL}/esb/api/grade/getGradesAndClas`,
    name: '获取所有的年级及班级',
    get: async function (data) {
      const dataObj = await http.get(this.url, data)
      return dataObj
    }
  },
  getAllGradeClassStudents: {
    url: `${process.env.VUE_APP_API_URL}/eduSurvey/api/common/gradeClassStuList`,
    name: '获取所有年级及年级下的班级及班级下的学生',
    get: async function (data) {
      const dataObj = await http.get(this.url, data)
      return dataObj
    }
  },
  getDepTeacher: {
    url: `${process.env.VUE_APP_API_URL}/shijiwxy/portal/teachercharge/getTeacherDepList.json`,
    name: '获取部门及教师',
    get: async function (data) {
      const dataObj = await http.get(this.url, data)
      return dataObj
    }
  },
  getGradeClass: {
    url: `${process.env.VUE_APP_API_URL}/esb/api/class/getClassesOfGrade`,
    name: '获取年级下的班级',
    get: async function (data) {
      const dataObj = await http.get(this.url, data)
      return dataObj
    }
  }
}
